﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Epona.Domain.Query
{
    public class NamedParameters:IQueryParameters
    {
        public  Dictionary<string,object>Param{get;private set;}

        public static NamedParameters Create()
        {
            return new NamedParameters(new Dictionary<string,object>());
        }

        public static NamedParameters Create(Dictionary<string,object> param)
        {
            return new NamedParameters(param);
        }

        private NamedParameters(Dictionary<string,object>param)
        {
            this.Param = param;
        }

        public NamedParameters Add(string key,object value)
        {
            Param.Add(key, value);
            return this;
        }

        //TODO
        public NamedParameters Add(NamedParameters other)
        {
            Param.Concat(other.Param);
            return this;
        }
    }
}
